1. Field of the Invention
The present invention relates to computerized cryptographic methods for communications in a computer network or electronic communications system, and particularly to a method of cipher block chaining using elliptic curve cryptography based upon the elliptic curve discrete logarithm problem.
2. Description of the Related Art
In recent years, the Internet community has experienced explosive and exponential growth. Given the vast and increasing magnitude of this community, both in terms of the number of individual users and web sites, and the sharply reduced costs associated with electronically communicating information, such as e-mail messages and electronic files, between one user and another, as well as between any individual client computer and a web server, electronic communication, rather than more traditional postal mail, is rapidly becoming a medium of choice for communicating information. The Internet, however, is a publicly accessible network, and is thus not secure. The Internet has been, and increasingly continues to be, a target of a wide variety of attacks from various individuals and organizations intent on eavesdropping, intercepting and/or otherwise compromising or even corrupting message traffic flowing on the Internet, or further illicitly penetrating sites connected to the Internet.
Encryption by itself provides no guarantee that an enciphered message cannot or has not been compromised during transmission or storage by a third party. Encryption does not assure integrity due to the fact that an encrypted message could be intercepted and changed, even though it may be, in any instance, practically impossible, to cryptanalyze. In this regard, the third party could intercept, or otherwise improperly access, a ciphertext message, then substitute a predefined illicit ciphertext block(s), which that party, or someone else acting in concert with that party, has specifically devised for a corresponding block(s) in the message. The intruding party could thereafter transmit the resulting message with the substituted ciphertext block(s) to the destination, all without the knowledge of the eventual recipient of the message.
The field of detecting altered communication is not confined to Internet messages. With the burgeoning use of stand-alone personal computers, individuals or businesses often store confidential information within the computer, with a desire to safeguard that information from illicit access and alteration by third parties. Password controlled access, which is commonly used to restrict access to a given computer and/or a specific file stored thereon, provides a certain, but rather rudimentary, form of file protection. Once password protection is circumvented, a third party can access a stored file and then change it, with the owner of the file then being completely oblivious to any such change.
Methods of adapting discrete-logarithm based algorithms to the setting of elliptic curves are known. However, finding discrete logarithms in this kind of group is particularly difficult. Thus, elliptic curve-based crypto algorithms can be implemented using much smaller numbers than in a finite-field setting of comparable cryptographic strength. Therefore, the use of elliptic curve cryptography is an improvement over finite-field based public-key cryptography.
Block ciphers are presently the most popular algorithms in use for providing data privacy. Block ciphers with a block size n and a key size k can be viewed as a family of permutations on the set of all n-bit strings, indexed by k-bit long encryption keys and possessing certain properties.
Some of the properties that are typically required of block ciphers are simplicity of construction and security. With regard to security, it is usually assumed that the underlying block cipher is secure and that the key size k is chosen so that an exhaustive key search is computationally infeasible. In practice, there are two issues to be considered with respect to security: (i) for a randomly chosen key k, it appears as a random permutation on the set of n-bit strings to any computationally bounded observer (i.e., one who does not have an unlimited amount of processing power available) who does not know k and who can only see encryption of a certain number of plaintexts x of their choice; and (ii) to achieve a so-called semantic security which is resistant to collision attacks such as birthday and meet-in-the-middle attacks. Such attacks have been proven to reduce an exhaustive key search significantly against block ciphers. In practice, most data units (including any typical file, database record, IP packet, or email message) which require encryption are greater in length than the block size of the chosen cipher. This will require the application of the block cipher function multiple times. The encryption of many plaintext blocks under the same key, or the encryption of plaintexts having identical parts under the same key may leak information about the corresponding plaintext. In certain situations, it is impossible to achieve semantic security. The goal then is to leak the minimum possible amount of information.
A further property is scalability. Obviously, no block cipher can be secure against a computationally unbounded attacker capable of running an exhaustive search for the unknown value of k. Furthermore, the development of faster machines will reduce the time it takes to perform an exhaustive key search. There is always a demand for more secure ciphers. It will be advantageous to develop a block cipher which is scalable so that an increase in security can be achieved by simply changing the length of the key rather than changing the block cipher algorithm itself.
Another property is efficiency. It is obvious that block ciphers are made computationally efficient to encrypt and decrypt to meet the high data rates demands of current applications such as in multimedia. Furthermore, since speed of execution is also important, it is advantageous to have block cipher that can be implemented in parallel. Of further interest is random access. Some modes allow encrypting and decrypting of any given block of the data in an arbitrary message without processing any other portions of the message.
Keying material is also an important factor in block ciphers. Some modes require two independent block cipher keys, which leads to additional key generation operations, a need for extra storage space or extra bits in communication. Additionally, of interest, are counter/IV/nonce requirements. Almost all modes make use of certain additional values together with block cipher key(s). In certain cases, such values must be generated at random or may not be reused with the same block cipher key to achieve the required security goals. Further, pre-processing capability is another important factor in block ciphers
The Data Encryption Standard (DES) is a public standard and is presently the most popular and extensively used system of block encryption. DES was adopted as a federal government standard in the United States in 1977 for the encryption of unclassified information. The rapid developments in computing technology in recent years, in particular the ability to process vast amounts of data at high speed, meant that DES could not withstand the application of brute force in terms of computing power. In the late 1990's, specialized “DES cracker” machines were built that could recover a DES key after a few hours by trying possible key values. As a result, after 21 years of application, the use of DES was discontinued by the United States in 1998.
A new data encryption standard called Advanced Encryption Standard (AES) was launched in 2001 in the United States, and it was officially approved with effect from 26 May 2002. However, AES has no theoretical or technical innovation over its predecessor, DES. The basic concept remains the same and, essentially, all that has changed is that the block size n has been doubled. The AES standard specifies a block size of 128 bits and key sizes of 128, 192 or 256 bits. Although the number of 128-bit key values under AES is about 1021 times greater than the number of 56-bit DES keys, future advances in computer technology may be expected to compromise the new standard in due course. Moreover, the increase in block size may be inconvenient to implement.
Furthermore, AES is not based on known computationally hard problems, such as performing factorization or solving a discrete logarithm problem. It is known that encryption methods that are based on known cryptographic problems are usually stronger than those that are not based on such problems. Also, AES provides a limited degree of varying security, 128-bits, 192-bits and 256-bits; i.e., it not truly scalable. It should noted that to have a cipher with a higher degree of security, the cipher would probably need a completely new algorithm which will make the hardware for AES redundant. As a clear example, the hardware for DES cannot be used efficiently for AES. Also, the hardware of the 192-bits AES cipher is not completely compatible with the hardware of the other two ciphers 128-bits and 256-bits.
There are many ways of encrypting data stream that are longer than a block size, where each is referred to as a “mode of operation”. Two of the standardized modes of operation employing DES are Electronic Code Book (ECB), and Cipher Block Chaining (CBC). It should be noted that the security of a particular mode should in principle be equivalent to the security of the underlying cipher. For this, we need to show that a successful attack on the mode of operation gives us almost an equally successful attack on the underlying cipher.
With regard to the ECB mode, in order to encrypt a message of arbitrary length, the message is split into consecutive n-bit blocks, and each block is encrypted separately. Encryption in ECB mode maps identical blocks in plaintext to identical blocks in ciphertext, which obviously leaks some information about plaintext. Even worse, if a message contains significant redundancy and is sufficiently long, the attacker may get a chance to run statistical analysis on the ciphertext and recover some portions of the plaintext. Thus, in some cases, security provided by ECB is unacceptably weak. ECB may be a good choice if all is need is protection of very short pieces of data or nearly random data. A typical use case for ECB is the protection of randomly generated keys and other security parameters.
With regard to CBC mode, in this mode the exclusive-or (XOR) operation is applied to each plaintext block and the previous ciphertext block, and the result is then encrypted. An n-bit initialization vector IV is used to encrypt the very first block. Unlike ECB, CBC hides patterns in plaintext. In fact, it can be proved that there is a reduction of security of CBC mode to security of the underlying cipher provided that IV is chosen at random. The computational overhead of CBC is just a single XOR operation per block encryption/decryption, so its efficiency is relatively good. Further, CBC provides random read access to encrypted data; i.e., to decrypt the i-th block, we do not need to process any other blocks. However, any change to the i-th message block would require re-encryption of all blocks with indexes greater than i. Thus, CBC does not support random write access to encrypted data.
The most serious drawback of CBC is that it has some inherent theoretical problems. For example, if Mi denotes the i-th plaintext block and Ci denotes the i-th ciphertext block, if one observes in a ciphertext that Ci=Cj, it immediately follows that Mi XOR Mj=Ci-1 XOR Cj-1, where the right-hand side of the equation is known. This is called the “birthday” or matching ciphertext attack. Of course, if the underlying cipher is good in the sense of pseudorandom permutation, and its block size is sufficiently large, the probability of encountering two identical blocks in ciphertext is very low.
Another example of its security weakness is its use of XOR-based encryption. A further drawback of CBC is that its randomization must be synchronized between the sending and the receiving correspondent. CBC uses an initialization vector that must be generated at random. This initialization vector must be synchronized between the sending and receiving correspondent for correct decryption.
From the above, it is clear that the security of encrypting a sequence of message blocks using a block cipher depends on two aspects: the security of the underlying block cipher; and the effectiveness of the randomization used in reducing collision attacks when encrypting a sequence of blocks.
With regard to the security of the underlying block cipher, it is known that encryption methods that are based on computationally hard problems, such as performing factorization or solving a discrete logarithm problem, are usually stronger than those that are not based on such problems. Integer factorization can be formulated as follows: For an integer n that is the product of two primes p and q, the problem is to find the values of p and q given n only. The problem becomes harder for larger primes. The discrete logarithm problem can be formulated as follows: Given a value g and a value y whose value is equal to gk defined over a group, find the value of k. The problem becomes harder for larger groups. Although the applications of integer factorization and discrete logarithm problems in designing block ciphers is known, the resulting ciphers are computationally more demanding than those currently used, such as AES.
With regard to the effectiveness of randomization and semantic security, the one time pad is the only unconditionally semantically secure cipher presently in use. With the one time pad, the sequence of keys does not repeat itself. In other words, it is said to have an infinite cycle. However, since the sending and the receiving correspondents have to generate the same random sequence, the one time pad is impractical because of the long sequence of the non-repeating key. As a consequence, the keys to encrypt and decrypt in all private-key systems, including block ciphers, remain unchanged for every message block, or they are easily derived from each other by inference using identical random number generators at the sending and receiving correspondent. Furthermore, these generators must be initialized to the same starting point at both correspondents to ensure correct encryption and decryption. This is true of all the existing block ciphers, including the RNS encryption and decryption method discussed above.
Many methods have been proposed to construct a pseudo-random number generator or adaptive mechanisms for pseudo-random generation of permutations. Such methods include those based on tables that are used to increase randomization. However, no matter how good the randomization property of the underlying generator, it always has a finite number of states and, hence, the numbers generated by existing generators have a finite cycle where a particular sequence is repeated one cycle after other. Therefore, such block ciphers are vulnerable to collision attacks. Thus, the security of such block ciphers is very much dependant on the randomness of the random number generator. The RNS encryption and decryption method described above is not an exception. As a consequence, one can conclude that semantic insecurity is inherent in all existing block ciphers, but with varying degrees.
In the following, existing ciphers where both the sending and the receiving correspondents have to generate the same random sequence will be referred to as synchronized-randomization ciphers. Synchronized-randomization is achieved under the control of a key or some form of an initialization mechanism. Starting from this initial value, the subsequent keys are easily obtained by some form of a random number generator. Therefore, synchronized-randomization between encryption and decryption is guaranteed as long as identical random number generators are used by both correspondents and as long as the generators at both correspondents are synchronized to start from the same initial state. Thus, no unilateral change in the randomization method is allowed in synchronized-randomization.
In practice, an elliptic curve group over a finite field F is formed by choosing a pair of a and b coefficients, which are elements within F. The group consists of a finite set of points P(x,y) which satisfy the elliptic curve equation F(x,y)=y2−x3−ax−b=0, together with a point at infinity, O. The coordinates of the point, x and y, are elements of F represented in N-bit strings. In the following, a point is either written as a capital letter (e.g., point P) or as a pair in terms of the affine coordinates; i.e. (x,y).
The elliptic curve cryptosystem relies upon the difficulty of the elliptic curve discrete logarithm problem (ECDLP) to provide its effectiveness as a cryptosystem. Using multiplicative notation, the problem can be described as: given points B and Q in the group, find a number k such that Bk=Q; where k is the discrete logarithm of Q to the base B. Using additive notation, the problem becomes: given two points B and Q in the group, find a number k such that kB=Q.
In an elliptic curve cryptosystem, the large integer k is kept private and is often referred to as the secret key. The point Q together with the base point B are made public and are referred to as the public key. The security of the system, thus, relies upon the difficulty of deriving the secret k, knowing the public points B and Q. The main factor which determines the security strength of such a system is the size of its underlying finite field. In a real cryptographic application, the underlying field is made so large that it is computationally infeasible to determine k in a straightforward way by computing all the multiples of B until Q is found.
At the heart of elliptic curve geometric arithmetic is scalar multiplication, which computes kB by adding together k copies of the point B. Scalar multiplication is performed through a combination of point-doubling and point-addition operations. The point-addition operations add two distinct points together and the point-doubling operations add two copies of a point together. To compute, for example, B=(2*(2*(2B)))+2B=Q, it would take three point-doublings and two point-additions.
Addition of two points on an elliptic curve is calculated as follows: when a straight line is drawn through the two points, the straight line intersects the elliptic curve at a third point. The point symmetric to this third intersecting point with respect to the x-axis is defined as a point resulting from the addition. Doubling a point on an elliptic curve is calculated as follows: when a tangent line is drawn at a point on an elliptic curve, the tangent line intersects the elliptic curve at another point. The point symmetric to this intersecting point with respect to the x-axis is defined as a point resulting from the doubling. Table 1 illustrates the addition rules for adding two points (x1,y1) and (x2,y2); i.e., (x3,y3)=(x1,y1)+(x2,y2):
TABLE 1Summary of Addition Rules: (x3, y3) = (x1, y1) + (x2, y2)General Equationsx3 = m2 − x2 − x1y3 = m (x3 − x1) + y1 Point Addition  m  =                    y        2            -              y        1                            x        2            -              x        1             Point Doubling (x3, y3) = 2(x1, y1)  m  =                    3        ⁢                  x          1          2                    -      a              2      ⁢              y        1             (x2, y2) = −(x1, y1)(x3, y3) = (x1, y1) + (−(x2, y2)) = O(x2, y2) = O − (x1, y1)(x3, y3) = (x1, y1) + O = (x1, y1) = (x1, −y1)
For elliptic curve encryption and decryption, given a message point (xm,ym), a base point (xB,yB), and a given key, k, the cipher point (xC,yC) is obtained using the equation (xC,yC)=(xm,ym)+k(xB,yB).
There are two basics steps in the computation of the above equations. The first step is to find the scalar multiplication of the base point with the key, k(xB,yB). The resulting point is then added to the message point, (xm,ym) to obtain the cipher point. At the receiver, the message point is recovered from the cipher point, which is usually transmitted, along with the shared key and the base point (xm,ym)=(xC,yC)−k(xB,yB).
As noted above, the x-coordinate, xm, is represented as an N-bit string. However, not all of the N-bits are used to carry information about the data of the secret message. Assuming that the number of bits of the x-coordinate, xm that do not carry data is L, then the extra bits L are used to ensure that message data, when embedded into the x-coordinate, will lead to an xm value which satisfies the elliptic curve equation (1). Typically, if the first guess of xm is not on a curve, then the second or third try will be.
Thus, the number of bits used to carry the bits of the message data is (N−L). If the secret data is a K-bit string, then the number of elliptic curve points needed to encrypt the K-bit data is
      ⌈          K              N        -        L              ⌉    .It is important to note that the y-coordinate, ym, of the message point carries no data bits.
Given a cubic equation in x defined over a finite field, F(p), of the form, t=x3+ax+b, where xεF(p) tεF(p)aεF(p) and bεF(p), then any value of x will lead to a value of tεF(p). It should be noted that t could be either quadratic residue or non-quadratic residue. If t is quadratic residue, it can be written as t=y2, and if t is non-quadratic residue, it can be written as t= αy2 where α is a non quadratic element of F(p); i.e., √{square root over ( α∉F(p). Thus, equation (5), can be written as αy2=x3+ax+b, where α=1 if t is quadratic residue, and α= α if t is non-quadratic residue.
It should be noted that for a specific coefficient a,bεF(p)that when α=1, the resulting curve is an elliptic curve. However, if α= α, this leads to a twist of the elliptic curve obtained with α=1. Thus, any value of xεF(p) will lead to a point (x,√{square root over (α)}y) which is either on an elliptic curve or its twist. If α=1, the point (x,√{square root over (α)}y) is on the elliptic curve. If α= α, the point (x,√{square root over (α)}y) is on its twist.
Elliptic points can be formulated on a twist of an elliptic curve in the same fashion as they are formulated for elliptic curves. As result, elliptic curve cryptography can also be defined on twists of elliptic curves in the same manner as that described above. Equations for point addition on an elliptic curve or its twist are given in Table 2 below. If α=1, the equations are for point addition on an elliptic curve, and when α= α, the equations are for point addition on its twist.
TABLE 2Summary of Addition Rules for elliptic curves or their twists:(x3 , {square root over (α)}y3) = (x1, {square root over (α)}y1) + (x2, {square root over (α)}y2)General Equationsx3 = m2 − x2 − x1{square root over (α)}y3 = m (x3 − x1) + {square root over (α)}y1 Point Addition  m  =            α        ⁢                            y          2                -                  y          1                                      x          2                -                  x          1                     Point Doubling (x3, y3) = 2(x1, y1)  m  =                    3        ⁢                  x          1          2                    -      a              2      ⁢              α            ⁢              y        1             (x2, {square root over (α)}y2) = −(x1, {square root over (α)}y1)(x3, {square root over (α)}y3) = (x1, {square root over (α)}y1) + (−(x2, {square root over (α)}y2)) = O(x2, {square root over (α)}y2) = O −(x3, {square root over (α)}y3) = (x1, {square root over (α)}y1) + O =(x1, {square root over (α)}y1)(x1, {square root over (α)}y1) = (x1, −{square root over (α)}y1)
Encryption and decryption equations are modified accordingly: (xc,√{square root over (α)}yC)=(xm,√{square root over (α)}ym)+k(xB,√{square root over (α)}yB); and (xm,√{square root over (α)}ym)=(xC,√{square root over (α)}yC)−k(xB,√{square root over (α)}yB).
When α=1, the equations are the cryptography equations over an elliptic curve, and when α= α, they define the cryptography equations over its twist. An attack method referred to as power analysis exists, in which the secret information is decrypted on the basis of leaked information. An attack method in which change in voltage is measured in cryptographic processing using secret information, such as DES (Data Encryption Standard) or the like, such that the process of the cryptographic processing is obtained, and the secret information is inferred on the basis of the obtained process is known.
An attack method, referred to as power analysis exists, in which the secret information is decrypted on the basis of leaked information. An attack method in which change in voltage is measured in cryptographic processing using secret information, such as DES (Data Encryption Standard) or the like, such that the process of the cryptographic processing is obtained, and the secret information is inferred on the basis of the obtained process is known.
As one of the measures against power analysis attack on elliptic curve cryptosystems, a method using randomized projective coordinates is known. This is a measure against an attack method of observing whether a specific value appears or not in scalar multiplication calculations, and inferring a scalar value from the observed result. By multiplication with a random value, the appearance of such a specific value is prevented from being inferred.
In the above-described elliptic curve cryptosystem, attack by power analysis, such as DPA or the like, was not taken into consideration. Therefore, in order to relieve an attack by power analysis, extra calculation has to be carried out using secret information in order to weaken the dependence of the process of the cryptographic processing and the secret information on each other. Thus, time required for the cryptographic processing increases so that cryptographic processing efficiency is lowered.
With the development of information communication networks, cryptographic techniques have been indispensable elements for the concealment or authentication of electronic information. Efficiency in terms of computation time is a necessary consideration, along with the security of the cryptographic techniques. The elliptic curve discrete logarithm problem is so difficult that elliptic curve cryptosystems can make key lengths shorter than that in Rivest-Shamir-Adleman (RSA) cryptosystems, basing their security on the difficulty of factorization into prime factors. Thus, the elliptic curve cryptosystems offer comparatively high-speed cryptographic processing with optimal security. However, the processing speed is not always high enough to satisfy smart cards, for example, which have restricted throughput or servers which have to carry out large volumes of cryptographic processing.
The pair of equations for m in Table 1 are referred to as “slope equations”. Computation of a slope equation in finite fields requires one finite field division. Alternatively, the slope computation can be computed using one finite field inversion and one finite field multiplication. Finite field division and finite field inversion are costly in terms of computational time because they require extensive CPU cycles for the manipulation of two elements of a finite field with a large order. Presently, it is commonly accepted that a point-doubling and a point-addition operation each require one inversion, two multiplications, a square, and several additions. At present, there are techniques to compute finite field division and finite field inversion, and techniques to trade time-intensive inversions for multiplications through performance of the operations in projective coordinates.
In cases where field inversions are significantly more time intensive than multiplication, it is efficient to utilize projective coordinates. An elliptic curve projective point (X,Y,Z) in conventional projective (or homogeneous) coordinates satisfies the homogeneous Weierstrass equation: {tilde over (F)}(X,Y,Z)=Y2Z−X3−aXZ2−bZ3=0, and, when z≠0, it corresponds to the affine point
      (          x      ,      y        )    =            (                        X          Z                ,                  Y          Z                    )        .  other projective representations lead to more efficient implementations of the group operation, such as, for example, the Jacobian representations, where the triplets (X,Y,Z) correspond to the affine coordinates
      (          x      ,      y        )    =      (                  X                  Z          2                    ,              Y                  Z          3                      )  whenever Z≠0. This is equivalent to using a Jacobian elliptic curve equation that is of the form {tilde over (F)}j(X,Y,Z)=Y2−X3−aXZ4−bZ6=0.
Another commonly used projection is the Chudnovsky-Jacobian coordinate projection. In general terms, the relationship between the affine coordinates and the projection coordinates can be written as
      (          x      ,      y        )    =      (                  X                  Z          i                    ,              Y                  Z          j                      )  where the values of i and j depend on the choice of the projective coordinates. For example, for homogeneous coordinates, i=1 and j=1.
The use of projective coordinates circumvents the need for division in the computation of each point addition and point doubling during the calculation of scalar multiplication. Thus, finite field division can be avoided in the calculation of scalar multiplication,
      k    ⁡          (                                    X            B                                Z            B            i                          ,                              Y            B                                Z            B            j                              )        ,when using projective coordinates.
The last addition for the computation of the cipher point,
            (                                    X            m                                Z            m            i                          ,                              Y            m                                Z            m            j                              )        ⁢                  ⁢    and    ⁢                  ⁢          k      ⁡              (                                            X              B                                      Z              B              i                                ,                                    Y              B                                      Z              B              j                                      )              ,i.e., the addition of the two points
      (                            X          C                          Z          C          i                    ,                        Y          C                          Z          C          j                      )    ;can also be carried out in the chosen projection coordinate:
      (                            X          C                          Z          C          i                    ,                        Y          C                          Z          C          j                      )    =            (                                    X            m                                Z            m            i                          ,                              Y                          m              ⁢                                                          ⁢              1                                            Z            m            j                              )        +                  (                                            X              B                                      Z              B              i                                ,                                    Y              B                                      Z              B              j                                      )            .      It should be noted that Zm=1.
However, one division (or one inversion and one multiplication) must still be carried out in order to calculate
            x      C        =                  X        C                    Z        C        i              ,since only the affine x-coordinate of the cipher point, xc, is sent by the sender.
Thus, the encryption of (N−L) bits of the secret message using elliptic curve encryption requires at least one division when using projective coordinates. Similarly, the decryption of a single message encrypted using elliptic curve cryptography also requires at least one division when using projective coordinates.
Thus, a method of cipher block chaining using elliptic curve cryptography solving the aforementioned problems is desired.